import React from 'react';
import { Table, Card, Row, Col } from 'antd';
import { CarouselModel, CalendarModel } from '../../components'
import PanelGroup from './components/PanelGroup'
import LineChart from './components/LineChart'
import PieChart from './components/PieChart'

// import { useIntl, FormattedMessage } from 'react-intl';

const Dashboard = () => {
  const columns = [
    {
      title: 'Name',
      dataIndex: 'name',
      key: 'name'
    },
    {
      title: 'Age',
      dataIndex: 'age',
      key: 'age',
    },
    {
      title: 'Address',
      dataIndex: 'address',
      key: 'address',
    },
    {
      title: 'Tags',
      key: 'tags',
      dataIndex: 'tags'
    },
    {
      title: 'Action',
      key: 'action'
    },
  ];
  const data = [
    {
      key: '1',
      name: 'John Brown',
      age: 32,
      address: 'New York No. 1 Lake Park',
      tags: ['nice', 'developer'],
    },
    {
      key: '2',
      name: 'Jim Green',
      age: 42,
      address: 'London No. 1 Lake Park',
      tags: ['loser'],
    },
    {
      key: '3',
      name: 'Joe Black',
      age: 32,
      address: 'Sidney No. 1 Lake Park',
      tags: ['cool', 'teacher'],
    },
  ];
  return (
    <>
      <PanelGroup />
      <Row gutter={[24, 24]}>
        <Col sm={24} md={12}><LineChart /></Col>
        <Col sm={24} md={12}><PieChart /></Col>
      </Row>
      <Row gutter={[24, 24]}>
        <Col sm={24} md={12}>
          <Card>
            <CalendarModel />
          </Card>
        </Col>
        <Col sm={24} md={12}>
          <CarouselModel />
          <Table columns={columns} dataSource={data} pagination={ false }/>
        </Col>
      </Row>
    </>
  )
}

export default Dashboard;
